﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Lyh.Repository;

namespace Lyh.Facade.Impl
{
    public class ActionFacade : IActionFacade
    {
        private readonly IActionRepository actionRepository;

        public ActionFacade(IActionRepository actionRepository)
        {
            this.actionRepository = actionRepository;
        }

        public IList<Models.Action> GetAllActionByAssembly()
        {
            return actionRepository.GetAllActionByAssembly();
        }

        public IList<Models.Action> GetActionByPage(string query, int start, int limit, out long total)
        {
            return actionRepository.GetActionByPage(query, start, limit, out total);
        }

        public void SaveOrUpdate(Models.Action action)
        {
            actionRepository.SaveOrUpdate(action);
        }
    }
}